import VueRouter from 'vue-router'
import Vue from 'vue';
Vue.use(VueRouter)
import Homecontainer from './components/tabber/homecontainer.vue'
import ShopContainer from './components/tabber/shopcarcontainer.vue'
import searchContainer from './components/tabber/searchcontainer.vue'
import membercontainer from './components/tabber/membercontainer.vue'
import newslist from './components/news/newslist.vue'
import newsinfo from './components/news/newsinfo.vue'
import photolist from './components/photos/PhotoList.vue'
import photoinfo from './components/photos/photoinfo.vue'
import goodslist from './components/goods/goodslist.vue'
import gooddetail from './components/goods/goodsDetails.vue'
import goodsdesc from './components/goods/goodsdesc.vue'
import goodscomment from './components/goods/goodscomment.vue'

let router =new VueRouter({
    routes:[//配置路由规则
        {path:'/',directives:'/home'},//路由重定向
        {path:'/home',component:Homecontainer},
        {path:'/shopcar',component:ShopContainer },
        {path:'/search',component:searchContainer},
        {path:'/member',component:membercontainer},
        {path:'/home/newslist',component:newslist},
        {path:'/home/newsinfo/:id',component:newsinfo},
        {path:'/home/photolist',component:photolist},
        {path:'/home/photoinfo/:id',component:photoinfo},
        {path:'/home/goodslist',component:goodslist},
        {path:'/home/goodsdetail/:id',component:gooddetail,name:'goodlist'},
        {path:'/home/goodsdesc/:id',component:goodsdesc,name:'/home/goodsdesc'},
        {path:'/home/goodscomment',component:goodscomment,name:'/home/goodscomment'}
    ],
    linkActiveClass:'mui-active'//覆盖路由默认的高亮类，路由的默认高亮类是router-link-active
})
export default router